package com.meizi.daily.service;

import com.meizi.daily.biz.CategoryBiz;
import com.meizi.daily.biz.PayTypeBiz;
import com.meizi.daily.entity.PayType;
import com.meizi.daily.vo.CategoryMenuVo;
import com.meizi.daily.vo.ConsumptionMenuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author meizi
 * @email enjoymeizi@gmail.com
 * @date 2020/6/11 18:37
 */
@Service
public class MenuService {
    @Autowired
    private CategoryBiz categoryBiz;
    @Autowired
    private PayTypeBiz payTypeBiz;

    /**
     * 返回消费信息的菜单
     *
     * @return
     */
    public ConsumptionMenuVo getConsumMenu() {
        ConsumptionMenuVo consumptionMenuVo = new ConsumptionMenuVo();
        //1.消费类型
        List<CategoryMenuVo> category = categoryBiz.getMenuList();
        //2.支付方式
        List<PayType> payTypes = payTypeBiz.selectListAll();
        //3.满意度
//        List<Map<String, Object>> satisfaction = SatisfactionEnum.mapper();
//        //4.流转方式
//        List<Map<String, Object>> walletType = WalletTypeEnum.mapper();
        consumptionMenuVo.setCategory(category);
        consumptionMenuVo.setPayTypes(payTypes);
        return consumptionMenuVo;
    }
}
